package com.huoyun.car.model;

import java.util.Comparator;

import com.huoyun.car.bean.CarPubInfo;

public class LoadAmountComparator implements Comparator<CarPubInfo> {

	@Override
	public int compare(CarPubInfo o1, CarPubInfo o2) 
	{
		try
		{
			Float firstAmount = Float.parseFloat(o1.getLoadAmount());
			Float secondAmount = Float.parseFloat(o2.getLoadAmount());
			return secondAmount.compareTo(firstAmount);
		}
		catch (Exception e) 
		{
			return 0;
		}
	}

}
